package com.fusetech.flow.audit.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fusetech.flow.audit.domain.AuditProcess;
import com.fusetech.flow.audit.service.dto.AuditProcessDTO;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;

/**
 * 审核流程MAPPER接口
 * @author admin
 * @version 2023-05-06
 */
public interface AuditProcessMapper extends BaseMapper<AuditProcess> {

    /**
     * 根据id获取审核流程
     * @param id
     * @return
     */
    AuditProcessDTO findById(String id);

    /**
     * 获取审核流程列表
     *
     * @param queryWrapper
     * @return
     */
    IPage <AuditProcessDTO> findList(Page <AuditProcessDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);

    /**
     * 找到列表zlc
     *
     * @param page         页面
     * @param queryWrapper 查询包装
     * @return {@link IPage} <{@link HashMap}>
     */
    IPage <HashMap> findListZLC(Page <AuditProcessDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);

}
